1. Field of the Invention
The present invention relates to a computer-readable recording medium having recorded therein an operating system, and a computer-readable recording medium having recorded therein an application program which is executed using the operating system.
2. Description of Related Art
Conventionally, for implementing, using a computer, an application program comprising a program module which receives a request message to effect a predetermined processing, it is necessary to state procedures which are to be followed by a receiver of the request message as shown in FIG. 1.
More specifically, a master thread is first created to receive the request message. The master thread produces a so-called message box to receive the request message at Step S1. An external request message will be passed to this message box.
The master thread monitors whether there exists a request message passed to the message box. A request message, if any, is received at Step S2. A slave thread to be processed based on the request message will be created at Step S3.
The slave thread thus created is processed in a predetermined manner based on the request message at Step S4. As a result of the predetermined processing, a reply message is sent to the master thread at Step S5. Thereafter, the slave thread is terminated at Step S6.
For implementing an application program which receives a request message to effect a predetermined processing as in the above, it is necessary to state the application program down to a slave thread in detail as having been mentioned above.
In many application programs, a program module which receives a request message to effect a predetermined processing is used very frequently. For the conventional application programs, procedures as mentioned above are stated for each of such program modules. Therefore, the creation of an application program requires much labor for statement of such procedures.
In the processing shown in FIG. 1, a slave thread is repeatedly created and terminated for each request message. However, the creation and termination of a thread needs relatively many calculations. Thus, the thread creation and terminal interfere with an improvement of program execution efficiency.
In the processing in FIG. 1, each time a request message is received, a thread is created. Taking dynamic resources into consideration, however, it is desirable in many cases to set an upper limit for a number of threads which can be created simultaneously. When it is necessary to set such an upper limit for a number of threads which can be executed simultaneously, it is necessary to state further complicated procedures, which takes much labor for programming.
The present invention has a major object to overcome the above-mentioned drawbacks of the prior art by providing a computer-readable recording medium having recorded therein an operating system permitting to easily state an application program comprising a program module which receives a request message to effect a predetermined processing.
According to an aspect of the present invention, the above object can be accomplished by providing a computer-readable recording medium having recorded therein an operating system comprising, as application program interfaces, a command to start a thread management program which receives a request message to create a thread which is processed based on the request message; a command to terminate the thread management program; and a command to register into the thread management program what is processed by the thread.
In addition, the operating system should desirably comprise a command to pass the request message to the thread management program, a command to have the thread management program output a reply message, a command to receive the reply message, or the like.
According to another aspect of the present invention, the above object can be accomplished by providing a computer-readable recording medium having recorded therein an operating system comprising a class including, as application program interfaces, a procedure of starting a thread management program which receives a request message to create a thread which is processed based on the request message, a procedure of terminating the thread management program, and a procedure of registering into the thread management program what is processed by the thread.
The xe2x80x9cclassxe2x80x9d referred to herein is an object having an information for creating and erasing the object. By sending a creation request message to a class object, a new object is created.
According to still another aspect of the present invention, the above object can also be accomplished by providing a computer-readable recording medium having recorded therein an application program which is executed using an operating system comprising, as application program interfaces, a command to start a thread management program which receives a request message to create a thread which is processed based on the request message, a command to terminate the thread management program, and a command to register into the thread management program what is processed by the thread.
According to yet another aspect of the present invention, the above object can be accomplished by providing a computer-readable recording medium having recorded therein an application program which is executed using an operating system comprising a class including, as application program interfaces, a procedure of starting a thread management program which receives a request message to create a thread which is processed based on the request message, a procedure of terminating the thread management program, and a procedure of registering into the thread management program what is processed by the thread.